package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "competing_products", schema = "springboot", catalog = "")
public class CompetingProducts {
    private int comProductsId;//竞品id
    private String comProductsName;//竞品名称
    private String comAdvantage;//优势
    private String comInferiority;//劣势
    private String comStrategy;//应对策略
    private String comPriceRange;//价格范围
    private String comPower;//竞争能力
    private Timestamp comTime;//创建时间
    private Integer comDelete;//删除状态

    @Id
    @Column(name = "com_products_id")
    public int getComProductsId() {
        return comProductsId;
    }

    public void setComProductsId(int comProductsId) {
        this.comProductsId = comProductsId;
    }

    @Basic
    @Column(name = "com_products_name")
    public String getComProductsName() {
        return comProductsName;
    }

    public void setComProductsName(String comProductsName) {
        this.comProductsName = comProductsName;
    }


    @Basic
    @Column(name = "com_advantage")
    public String getComAdvantage() {
        return comAdvantage;
    }

    public void setComAdvantage(String comAdvantage) {
        this.comAdvantage = comAdvantage;
    }

    @Basic
    @Column(name = "com_Inferiority")
    public String getComInferiority() {
        return comInferiority;
    }

    public void setComInferiority(String comInferiority) {
        this.comInferiority = comInferiority;
    }

    @Basic
    @Column(name = "com_strategy")
    public String getComStrategy() {
        return comStrategy;
    }

    public void setComStrategy(String comStrategy) {
        this.comStrategy = comStrategy;
    }

    @Basic
    @Column(name = "com_price_range")
    public String getComPriceRange() {
        return comPriceRange;
    }

    public void setComPriceRange(String comPriceRange) {
        this.comPriceRange = comPriceRange;
    }

    @Basic
    @Column(name = "com_power")
    public String getComPower() {
        return comPower;
    }

    public void setComPower(String comPower) {
        this.comPower = comPower;
    }

    @Basic
    @Column(name = "com_time")
    public Timestamp getComTime() {
        return comTime;
    }

    public void setComTime(Timestamp comTime) {
        this.comTime = comTime;
    }

    @Basic
    @Column(name = "com_delete")
    public Integer getComDelete() {
        return comDelete;
    }

    public void setComDelete(Integer comDelete) {
        this.comDelete = comDelete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CompetingProducts that = (CompetingProducts) o;
        return comProductsId == that.comProductsId &&
                Objects.equals(comAdvantage, that.comAdvantage) &&
                Objects.equals(comInferiority, that.comInferiority) &&
                Objects.equals(comStrategy, that.comStrategy) &&
                Objects.equals(comPriceRange, that.comPriceRange) &&
                Objects.equals(comPower, that.comPower) &&
                Objects.equals(comTime, that.comTime) &&
                Objects.equals(comDelete, that.comDelete);
    }

    @Override
    public int hashCode() {
        return Objects.hash(comProductsId, comAdvantage, comInferiority, comStrategy, comPriceRange, comPower, comTime, comDelete);
    }
}
